

{if 'row' == $key || 'column' == $key || is_int($key)}

	{assign var="attributes" value=$col->attributes()}

	{if 'row' == $key}
		<tr>
			<td style="background:#e0e0e0;">&nbsp;</td>
			<td colspan="6"  style="background:#e0e0e0;">
				Zeile: 
				<select name="fieldlabel[]">
					<option value="open" {if 'open' == $attributes->style}selected="selected"{/if}>aufgeklappt</option>
					<option value="closed" {if 'closed' == $attributes->style}selected="selected"{/if}>zugeklappt</option>
				</select>
				Titel: <input type="text" name="fieldname[]" value="{$attributes->title}" />
{*
				<input type="hidden" name="fieldlabel[]" value=""  />
				<input type="hidden" name="fieldname[]" value=""  />
*}				
				<input type="hidden" name="oldfieldname[]" value=""  />
				<input type="hidden" name="fieldlength[]" value=""  />
				<input type="hidden" name="formtype[]" value="row_open"  />
				<input type="hidden" name="fieldtype[]" value=""  />
			</td>
			<td style="background:#e0e0e0;">&nbsp;</td>
		</tr>
	{elseif  'column' == $key}
		<tr>
			<td style="background:#d0d0d0;">&nbsp;</td>
			<td colspan="6"  style="background:#d0d0d0;">
				Spalte: Anfang
				<input type="hidden" name="fieldlabel[]" value=""  />
				<input type="hidden" name="fieldname[]" value=""  />
				<input type="hidden" name="oldfieldname[]" value=""  />
				<input type="hidden" name="fieldlength[]" value=""  />
				<input type="hidden" name="formtype[]" value="column_open"  />
				<input type="hidden" name="fieldtype[]" value=""  />

			</td>
			<td style="background:#d0d0d0;">&nbsp;</td>
		</tr>
	{/if}
	{foreach from=$col key="key2" item="col2"}
		{include file="`$ccdsClassEditor_DIR`class_config_table_field.tpl" key=$key2 col=$col2}
	{/foreach}
	{if 'row' == $key}
		<tr>
			<td style="background:#e0e0e0;">&nbsp;</td>
			<td colspan="6"  style="background:#e0e0e0;">
				Zeile: Ende
				<input type="hidden" name="fieldlabel[]" value=""  />
				<input type="hidden" name="fieldname[]" value=""  />
				<input type="hidden" name="oldfieldname[]" value=""  />
				<input type="hidden" name="fieldlength[]" value=""  />
				<input type="hidden" name="formtype[]" value="row_close"  />
				<input type="hidden" name="fieldtype[]" value=""  />
			</td>
			<td style="background:#e0e0e0;">&nbsp;</td>
		</tr>
	{elseif  'column' == $key}
		<tr>
			<td style="background:#d0d0d0;">&nbsp;</td>
			<td colspan="6"  style="background:#d0d0d0;">
				Spalte: Ende
				<input type="hidden" name="fieldlabel[]" value=""  />
				<input type="hidden" name="fieldname[]" value=""  />
				<input type="hidden" name="oldfieldname[]" value=""  />
				<input type="hidden" name="fieldlength[]" value=""  />
				<input type="hidden" name="formtype[]" value="column_close"  />
				<input type="hidden" name="fieldtype[]" value=""  />
			</td>
			<td style="background:#d0d0d0;">&nbsp;</td>
		</tr>
	{/if}
	{elseif '@attributes' != $key}
		{if "id" == $col->label}
			{assign var="disabled" value="disabled='disabled'"}
		{else}
			{assign var="disabled" value=""}
		{/if}
		
		{if $bgcolor == ""}
			{assign var="bgcolor" value="background:#ddd;"}
		{else}
			{assign var="bgcolor" value=""}
		{/if}
		<tr style="{$bgcolor}">
			<td>{$smarty.foreach.clsloop.iteration}</th>
			<td><input type="text" name="fieldlabel[]" value="{$col->label}" {$disabled}  /></td>
			<td>
				<input type="text" name="fieldname[]" value="{if !is_numeric($key)}{$key}{/if}" />
				<input type="hidden" name="oldfieldname[]" value="{if 1 != $col->new}{$key}{/if}" />
			</td>
			<td>
				<select size="1" style="width:80px;" name="fieldtype[]" {$disabled}>
				{foreach from=$db_fieldtypes key="fieldtype" item="foo"}
					<option value="{$fieldtype}" {if $fieldtype == $col->type}selected="selected"{/if}>{$fieldtype}</option>
				{/foreach}
				</select>
			</td>
			<td><input type="text" name="fieldlength[]" value="{$col->length}" style="width:65px;" {$disabled} /></td>
			<td>
				<select size="1" style="width:100px;" name="formtype[]" {$disabled}>
				{foreach from=$formtypes item="formtype"}
					<option value="{$formtype}" {if $formtype == $col->formtype}selected="selected"{/if}>{$formtype}</option>
				{/foreach}
				</select>
			</td>
			<td>
				<img src="{$CMS_LIBRARY_WEB}famfamfam/icons/pencil.png" border="0" alt="Feld bearbeiten" onclick="{strip}{literal}
			xajax.request(
			{
				ccdsclass:'ccdsClassEditor',
				ccdsfun: 'ClassEditorClassConfigField'
			}
			,
			{
				parameters: [
					{{/literal}
						type:'data',
						fieldname:'{$key}',class_id:{$class.class_id}
					{literal}}
				]
			}
			);
{/literal}{/strip}"/>
						</td>
						<td><a href="javascript:void(0);" onclick="{strip}{literal}foo=this;
	
$('<div />').xWindow('confirm',{title:'logout',content:'{/literal}{$smarty.config.Classeditor_confirm_del_row}{literal}'}, function(){
	{/literal}
	index = foo.parentNode.parentNode.rowIndex;
	xajax.$('table_config_{$class.class_id}').deleteRow(index);
	{literal}
});
{/literal}{/strip}" title="Zeile löschen">
							<img src="{$CMS_LIBRARY_WEB}famfamfam/icons/cross.png" border="0" alt="{$smarty.config.Classeditor_del_field}" /></a>
						</td>
					</tr>
{/if}